package section10;

import java.io.FileReader;
import java.io.IOException;

public class App10_5 {
    public static void main(String[] args) {
        char[] ch=new char[500];
        try (FileReader fr=new FileReader("C:\\Users\\Administrator\\Desktop\\hello.txt")){
            int num= fr.read(ch);
            String str=new String(ch,0,num);
            System.out.println("读取到的字符字数为："+num+",其内容如下：");
            System.out.println(str);
        }
        catch (IOException e){

        }
    }
}
